1. Field of the Invention
The present invention generally relates to semiconductor integrated circuits, and particularly relates to a semiconductor integrated circuit having an ADC and a DAC.
2. Description of the Related Art
There is a general-purpose chip having both an ADC (analog-to-digital converter) and a DAC (digital-to-analog converter) implemented on a single semiconductor integrated circuit chip together with a CPU, a memory, and the like. FIG. 1 is a drawing showing an example of a general configuration of such a chip.
In FIG. 1, an LSI chip 10 having an ADC and DAC mounted thereon includes a CPU 11, a timer 12, a port 13, a UART 14, a memory 15, an ADC 16, a DAC 17, and a bus 18. The CPU 11, the timer 12, the port 13, the UART 14, the memory 15, the ADC 16, and the DAC 17 are connected to each other via the bus 18.
The ADC 16 has an analog input thereof coupled to an external terminal 20. The DAC 17 has an analog output thereof coupled to an external terminal 21. The ADC 16 performs an AD conversion with respect to an analog voltage supplied via the external terminal 20, and outputs to the bus 18 a digital code obtained as the digital output of the AD conversion. The digital code is stored in the memory 15. The DAC 17 performs a DA conversion with respect to a digital input, which is a digital code supplied via the bus 18 from the CPU 11, for example, and outputs, to the outside via the external terminal 21, an analog voltage obtained as the analog output of the DA conversion.
The ADC and DAC generally involve conversion error. In consideration of this, it is preferable that conversion errors are measured in advance with respect to the ADC and DAC, respectively, and that a correction process is performed based on the measured errors at the time of performing an actual AD conversion and an actual DA conversion. In the LSI chip 10 as shown in FIG. 1, conventionally, a predetermined analog voltage is input via the external terminal 20 to subsequently check a digital code after the AD conversion, and an analog voltage after the DA conversion of a predetermined digital code is output and measured via the external terminal 21 for the purpose of obtaining the errors of the ADC 16 and DAC 17 of the LSI chip 10.
In such a case, there are needs to input analog voltages for a large number of sample points and to measure output analog voltages for a large number of sample points. This gives rise to a problem in that significant time and labor are required.
[Patent Document 1] Japanese Patent Application Publication No. 52-093361
Accordingly, there is a need for a semiconductor integrated circuit chip with an ADC and DAC mounted thereon that is capable of efficiently measuring and correcting errors of the ADC and DAC, and there is also a need for a program and method for error calculation and correction.